
function getPageIds() {
    var len = document.getElementsByClassName('course-card__cover-box').length;
    var courseIds = '';
    console.log(len);
    for (let i = 0; i < len; i++) {
        var state = document.getElementsByClassName('course-card__cover-box__status')[i].textContent;

        if (state != '已学完') {
            document.getElementsByClassName('course-card__cover-box__status')[i].click();
            var url = window.location.href;
            var courseIdIndex = url.indexOf('courseId');
            var courseId = url.substring(courseIdIndex + 8 + 1, courseIdIndex + 8 + 1 + 19);//19位
            console.log(courseId);
            courseIds = courseIds + ',' + courseIds;
            window.history.back();
        }

    }
}


function czdkc() {

    var len = document.getElementsByClassName('course-ware-list__item').length;
    for (let i = 0; i <= len; i++) {
        var divRow = document.getElementsByClassName('course-ware-list__item')[i];
        var process = divRow.getElementsByClassName('ant-progress-text')[0].textContent;
        console.log(process);

        if (process != '100%') {
            divRow.getElementsByClassName('course-ware-list__item__name')[0].click();

        }

    }
}

function clickWzdl() {
    var modalTs = document.getElementsByClassName('ant-modal')[0];
    var modalDisplay = document.getElementsByClassName('ant-modal')[0].style.display;
    console.log(modalDisplay);
    if (modalDisplay != 'none') {
        modalTs.getElementsByClassName('ant-modal-footer')[0].firstElementChild.click();
    }
}